package com.ruoyi.common.enums;

/**
 * 方案上传文件类型
 * 
 * @author ruoyi
 */
public enum FileType
{
    Create("create", "生成依据"),
    Effect("effect", "生效依据"),
    ;

    private final String code;
    private final String info;

    FileType(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }


    public static FileType organTypeOf(String code) {
        for(FileType actionEnum : values()){
            if(actionEnum.getCode().equals(code)){
                return actionEnum;
            }
        }
        throw new RuntimeException("没有找到对应的枚举");
    }
}
